package org.csu.webjpetstoreback.model;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.AllArgsConstructor;
import lombok.Builder;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.stereotype.Repository;

import java.io.Serializable;

@Builder
@NoArgsConstructor
@AllArgsConstructor
@Data
@Repository
@TableName(value = "signon")
public class Signon implements Serializable {
    private static final long serialVersionUID = -5644799954031156649L;
    @TableId(value = "username",type = IdType.AUTO)
    public String username;
    public String password;

    public void setSignon(Token token){
        this.username = token.userid;
        this.password = token.password;
    }

}
